<?php

use Doraemon\pockets\action\ApiAction;

abstract class ActionPlugin extends ApiAction
{
    const REPORT_CODE_PREFIX = "T-";
    const FROM_TYPE = "mall";
    const DEFAULT_ERROR_CODE = self::CODE_ERROR_VIEW_TOSTA;

    abstract public function main();

    protected function getPost($field, $default = null)
    {
        return $this->getRequest()->getPost($field, $default);
    }

    protected function getQuery($field, $default = null)
    {
        return $this->getRequest()->getQuery($field, $default);
    }

}
